import {tabdata ,proaddmodaldata,getceshiData} from "@/services/api";
import { stat } from "fs";

export default  {
namespace:'tab',
state:{
    
  tabdatali:[],
  modaldatapro:[],

  
},
effects: {
    *tabdatalist({ payload },{call,put}){
      const response = yield call(tabdata,{payload});
      yield put({
        type: 'getdata',
        payload: response,
      });
    },


*modaldata({ payload },{call,put}){
  const response = yield call(proaddmodaldata,{payload});
  // console.log(response)
  yield put({
    type: 'modaldataL',
    payload: response,
  });
},
},
  reducers: {
    getdata(state, action) {
      return {
        ...state,
        tabdatali: action.payload,
      };
    },
    getdataL(state, action) {
      return {
        ...state,
        listL: action.payload,
      };
    },
    modaldataL(state, action) {
      return {
        ...state,
        modaldatapro: action.payload,
       
      };
  },


}
}